<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="王超凡">
    <script src="./jquery.js"></script>
    <title></title>
    <style>
        *{
            box-sizing: border-box;
        }

       .moni{
         width: 300px;
         margin: 0 auto;
         position: relative;
       }
       .moni div{
           display: flex;
       }
       .moni span{ 
           width: 150px;
           line-height: 30px;
           text-align: center;
           background-color: red;
       }
       .moni .moni1-1{
           background-color: blue;
       }
       .moni2{
           margin: 0;
           padding: 0;
           list-style: none;
           width: 150px;
           height: 100px;
           border: 1px solid pink;
           position: absolute;
           left: 150px;
           top: 30px;
           text-align: center;
           display: none;
       }
       .moni2 li:hover{
           background-color: gray;
       }
    
    </style>
</head>
<body>
    <div class="moni">
        <div>
            <span>选择项目</span>
            <span class="moni1-1">未选择</span>
        </div>
        <ul class="moni2">
            <li>html5</li>
            <li>css3</li>
            <li>javaScript</li>
            <li>jQuery</li>
        </ul>
    </div>

</body>
</html>
<script>
    $('.moni1-1').click(function(){
        $('.moni2').css('display','block')  
    })
    $('.moni2 li').click(function(){
        $('.moni1-1').html($(this).text());
        $('.moni2').css('display','none');
    })

</script>